<%--
  Created by IntelliJ IDEA.
  User: dx
  Date: 2021/4/28
  Time: 10:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>键盘侠小说网站</title>
    <style>
        div{
            float: left;
        }
    </style>
</head>
<body>

<div style="width: 100%">
    <div style="width: 50%">
        <table border="1" style="margin: auto">
            <tr>
                <td>编号</td>
                <td>小说</td>
                <td>作者</td>
                <td>状态</td>
                <td>分类</td>
                <td>图片</td>
                <td>操作</td>
            </tr>
            <c:forEach var="subject" items="${PageInfo.list}">
                <tr>
                    <td>${subject.id}</td>
                    <td>
                        <a href="${pageContext.request.contextPath}/subject/${subject.id}">
                                ${subject.title}
                        </a>
                    </td>
                    <td>${subject.author}</td>
                    <td>${subject.status}</td>
                    <td>${subject.classify}</td>
                    <td>
                        <a href="${pageContext.request.contextPath}/subject/${subject.id}">
                            <img src="${subject.imgurl}" alt="" width="50px" height="50px">
                        </a>
                    </td>
                    <td>
                        <a href="${pageContext.request.contextPath}/subject/edit/${subject.id}">编辑</a>
                        <a href="${pageContext.request.contextPath}/subject/update/${subject.id}/1">删除</a>
                    </td>
                </tr>
            </c:forEach>
        </table>
<%--        <c:if test="">--%>
        <span><a href="${pageContext.request.contextPath}/subject/index?startpage=${PageInfo.prePage}">上一页</a></span>
<%--        </c:if>--%>
        <c:forEach items="${PageInfo.navigatepageNums}" var="i">
            <a href="${pageContext.request.contextPath}/subject/index?startpage=${i}">${i}</a>
        </c:forEach>
        <span><a href="${pageContext.request.contextPath}/subject/index?startpage=${PageInfo.nextPage}">下一页</a></span>
    </div>
    <div style="width: 50%">

        <table border="1" style="margin: auto">
            <tr>
                <td>编号</td>
                <td>小说</td>
                <td>作者</td>
                <td>状态</td>
                <td>分类</td>
                <td>图片</td>
                <td>操作</td>
            </tr>
            <c:forEach var="subject" items="${delsubjects}">
                <tr>
                    <td>${subject.id}</td>
                    <td>
                        <a href="${pageContext.request.contextPath}/subject/${subject.id}">
                                ${subject.title}
                        </a>
                    </td>
                    <td>${subject.author}</td>
                    <td>${subject.status}</td>
                    <td>${subject.classify}</td>
                    <td>
                        <a href="${pageContext.request.contextPath}/subject/${subject.id}">
                            <img src="${subject.imgurl}" alt="" width="50px" height="50px">
                        </a>
                    </td>
                    <td>
                        <a href="${pageContext.request.contextPath}/subject/update/${subject.id}/0">还原</a>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
</div>



    <hr>


</body>

</html>
